Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test to show that IPA fails for cap 1, 2, 3, and 4 #1346

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

eriktaubeneck
Copy link
Member

@akoshelev here is a few basic tests to show the that IPA doesn't work for per user credit cap of 1, 2, 3, or 4.

eriktaubeneck and others added 2 commits October 11, 2024 10:43
It is still gross that we use 3 bit trigger values for everything, but oh well...
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.48%. Comparing base (726a549) to head (6283343).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1346      +/-   ##
==========================================
+ Coverage   93.44%   93.48%   +0.04%     
==========================================
  Files         209      211       +2     
  Lines       34512    34959     +447     
==========================================
+ Hits        32249    32683     +434     
- Misses       2263     2276      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -147,13 +147,15 @@ where
#[cfg(not(feature = "relaxed-dp"))]
let padding_params = PaddingParameters::default();
match config.per_user_credit_cap {
1 => oprf_ipa::<_, BA8, BA3, HV, BA20, 1, 256>(ctx, input, aws, dp_params, padding_params).await,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using BA3 for trigger values with cap 1 is gross, but the input is assumed to be fixed size, so it is a much bigger change to make if we want it

8 => oprf_ipa::<_, BA8, BA3, HV, BA20, 3, 256>(ctx, input, aws, dp_params, padding_params).await,
16 => oprf_ipa::<_, BA8, BA3, HV, BA20, 4, 256>(ctx, input, aws, dp_params, padding_params).await,
32 => oprf_ipa::<_, BA8, BA3, HV, BA20, 5, 256>(ctx, input, aws, dp_params, padding_params).await,
64 => oprf_ipa::<_, BA8, BA3, HV, BA20, 6, 256>(ctx, input, aws, dp_params, padding_params).await,
128 => oprf_ipa::<_, BA8, BA3, HV, BA20, 7, 256>(ctx, input, aws, dp_params, padding_params).await,
_ => panic!(
"Invalid value specified for per-user cap: {:?}. Must be one of 8, 16, 32, 64, or 128.",
"Invalid value specified for per-user cap: {:?}. Must be one of 1, 2, 4, 8, 16, 32, 64, or 128.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why we picked cap sizes to be a power of two, but I tried to stick with the same approach.

@eriktaubeneck, @shinta-liem would that be sufficient for in-market test to support cap of 1, 2 and 4?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's plenty sufficient

@eriktaubeneck eriktaubeneck marked this pull request as ready for review October 11, 2024 23:30
@richajaindce richajaindce merged commit 57fa8a5 into private-attribution:main Oct 16, 2024
12 checks passed
@eriktaubeneck eriktaubeneck deleted the small_cap_error branch October 19, 2024 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants